from pydantic import BaseModel, Field

from rosa.love_is_blue.types import BaseResponse
from rosa.scarborough_fair.depends.authorization.types import PayloadDataUserInfo


class UserInfoResponse(BaseResponse):
    data: PayloadDataUserInfo


class SystemTokenBody(BaseModel):
    app_id: int = Field(..., title="应用id", description="自定义的应用id", examples=[1], alias='appId')
    name: str = Field(..., title="应用名称", description="应用名称", examples=["name"])
    username: str = Field('', title="应用用户名", description="应用用户名，填充字段，默认与应用名称相同", examples=["username"])
    email: str = Field('', title="应用邮箱", description="应用邮箱，填充字段，默认为空", examples=["email"])
    avatar: str = Field('', title="应用头像", description="应用头像，填充字段，默认为空", examples=["avatar"])
    superuser: bool = Field(False, title="是否为超级用户", description="是否为超级用户权限，默认为False")
    remember: bool = Field(False, title="是否记住登录", description="是否记住登录，默认为False")
    exp: int = Field(94608000, title="过期时间", description="过期时间，默认为3年")
    scope: str = Field('', title="权限范围", description="权限范围，默认为空")
